//
//  PhotFacImage.m
//  wtshoppingcite
//
//  Created by Baojia-LC on 14/11/10.
//  Copyright (c) 2014年 TW. All rights reserved.
//

#import "PhotFacImage.h"

@implementation PhotFacImage

-(id)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if(self){
        
        UITapGestureRecognizer* doubleRec = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleClickPress:)];
        doubleRec.numberOfTapsRequired = 2;
        self.clipsToBounds = YES;
        self.contentMode = UIViewContentModeScaleAspectFill;
        self.userInteractionEnabled = YES;
        [self addGestureRecognizer:doubleRec];
    }
    return self;
}

//-(void)doubleClickPress:(UITapGestureRecognizer*)tap{
//    if(_block != nil){
//        _block(self);
//    }
//}

-(void)doubleClickPress:(UITapGestureRecognizer*)tap{
    
    if ([self.t_delegate respondsToSelector:@selector(tappedWithObject:)])
    {
        [self.t_delegate tappedWithObject:self];
    }
}

@end
